package edu.sctu.xialei.june.day20150614one.iterator.test;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

/**
 * Created by Administrator on 2015/6/14.
 */
public class IterorPracticeOne {

    public void test() {
        List name = new ArrayList<String>();
        name.add("夏磊");
        name.add("小花");
        name.add("小水");
        name.add("小贱");
        name.add("小残");

        Iterator iterator = name.iterator();

        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }


}
